package org.shangma.mapper;

import org.shangma.common.Account;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface AccountMapper {

    @Select("select * from t_account where id=#{accoundId}")
    Account findAccountById(int accoundId);

    /**
     * 添加订单
     */
    @Insert("update t_account set money=money-#{money} where id=#{accountId} ")
    void reduceMondy(@Param("money") double money, @Param("accountId") int accountId);
}
